package com.example.authority.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Data;

import lombok.experimental.Accessors;


/**
 * @program: authority-hm-0.0.1
 * @ClassName:Message
 * @description: 留言记录 实体类
 * @author:dyy
 * @Version 3.0
 **/

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_message")
@Schema(title = "Message对象", description = "留言记录")
public class Message implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(title = "序列号")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("序列号")
    private Long id;

    @Schema(title = "标题")
    @TableField("name")
    @ExcelProperty("标题")
    private String name;

    @Schema(title = "详情")
    @TableField("des")
    @ExcelProperty("详情")
    private String des;

    @Schema(title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(title = "创建账户")
    @TableField("username")
    @ExcelProperty("创建账户")
    private String username;

    @Schema(title = "回复内容")
    @TableField("reply")
    @ExcelProperty("回复内容")
    private String reply;

    @Schema(title = "当前状态")
    @TableField("statu")
    @ExcelProperty("当前状态")
    private Integer statu;


}
